if [[ ! -z $1 ]] && [[ -d $1 ]] && [[ -z ${unline_path} ]]
then
PREHOME=$1
elif [[ ! -z ${unline_path} ]]
then
PREHOME=${unline_path}
else
PREHOME=${HOME}"/unline"
fi
if [[ ! -d ${PREHOME}/mysqldiff ]]
then
  wget -P ${PREHOME}/mysqldiff https://cdn.mysql.com/archives/mysql-utilities/mysql-utilities-1.6.5.tar.gz
fi
DIR=$( dirname "$(readlink -f  ${BASH_SOURCE[0]})" )
#当前脚本上一层路径
PARENTPATH=$(dirname ${DIR})
SOURCEFILE=`sh ${PARENTPATH}/getunlinefile.sh ${PREHOME} mysqldiff`
if [[ ! -d ${HOME}/temp/mysqldiff ]]
then
  mkdir -p ${HOME}/temp/mysqldiff
fi
tar -zxvf ${PREHOME}/mysqldiff/${SOURCEFILE} -C ${HOME}/temp/mysqldiff
cd ${HOME}/temp/mysqldiff/${SOURCEFILE%%.tar.gz}
python2 setup.py build
sudo python2 setup.py install
mysqldiff --version
